<template>
  <div class="app">
    <nav class="nav">
      <div class="nav-container">
        <div class="logo">组件库学习</div>
        <div class="nav-links">
          <router-link to="/" class="nav-link">首页</router-link>
          <router-link to="/fontawesome" class="nav-link">图标示例</router-link>
        </div>
      </div>
    </nav>
    
    <router-view></router-view>
  </div>
</template>

<style>
.app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #2c3e50;
}

.nav {
  background-color: #ffffff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
  margin-bottom: 16px;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 25px;
  height: 64px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 20px;
  font-weight: bold;
  color: #42b983;
}

.nav-links {
  display: flex;
  gap: 24px;
}

.nav-link {
  font-weight: 500;
  color: #2c3e50;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.nav-link:hover {
  background-color: rgba(66, 185, 131, 0.1);
  color: #42b983;
}

.nav-link.router-link-exact-active {
  color: #ffffff;
  background-color: #42b983;
}
</style>